// import { App } from "./app";

///<reference path='./app.ts'/>
class Enemy extends lg.Bitmap {
    public _hp:number;
    private _fight:boolean;
    constructor(imageOrUrl: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | Object | string)
    {
        super(imageOrUrl);
    }
    public initData()
    {
        this._hp=1;    
        this._fight=false;
    }
    public start():void
    {
        this._fight=true;
        this.loop();
    }
    private loop()
    {

        // if(!this._fight) return;
        // setTimeout(()=>{
        //     this._hp--;
        //     this.loop();
        //     // console.log("hp"+this._hp)
        //     if(this._hp==0)
        //     {
        //         this.stop();
        //         this.visible=false;
        //     }
        // },1000);
    }
    public stop():void
    {
        this._fight=false;
    }

    
}